package com.gitee.urick.union.api.controller;

import com.gitee.urick.union.entity.HelloWorld;
import com.gitee.urick.union.utils.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Controller hello
 *
 * @author Rick 2021/3/8 15:31
 * @since 1.0
 */
@RestController
@RequestMapping("/hello")
public class HelloController {

    /**
     * Hi !
     *
     * @return Result
     */
    @GetMapping("/hi")
    public Result<HelloWorld> hello() {
        HelloWorld helloWorld = new HelloWorld();
        helloWorld.setWelcome("Hi!");
        return Result.success(helloWorld);
    }
}
